package com.kelvin.oocl.crm.entity;

import java.util.Arrays;

public class Command {
	private String commond;
	private String[] parameters;
	
	public Command(String commond,String[] parameters) {
		super();
		this.commond = commond;
		this.parameters = parameters;
	}
	
	public Command() {
		super();
	}

	public String getCommond() {
		return commond;
	}

	public void setCommond(String commond) {
		this.commond = commond;
	}

	public String[] getParameters() {
		return parameters;
	}

	public void setParameters(String[] parameters) {
		this.parameters = parameters;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((commond == null) ? 0 : commond.hashCode());
		result = prime * result + Arrays.hashCode(parameters);
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Command other = (Command) obj;
		if (commond == null) {
			if (other.commond != null)
				return false;
		} else if (!commond.equals(other.commond))
			return false;
		if (!Arrays.equals(parameters, other.parameters))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "Command [commond=" + commond + ", parameters=" + Arrays.toString(parameters) + "]";
	}
	
	
}
